package com.gopay.common.domain.cps.vo;

/**
 * 枚举，定义手续费出款账户标志
 * 
 * @FeeFrom.java
 * @author MA HUAN
 * @2013-1-6 下午6:59:01 www.gopay.com.cn Inc.All rights reserved.
 */
public enum FeeFrom {

    PAY_ACCT, RECV_ACCT, MER_PAYER;

    public static FeeFrom get(String str, FeeFrom defaultValue) {
        if ("01".equals(str)) {
            return PAY_ACCT;
        } else if ("02".equals(str)) {
            return RECV_ACCT;
        }  else if ("03".equals(str)) {
        	return MER_PAYER;
        } else {
            return defaultValue;
        }
    }

    public static FeeFrom get(String str) {
        if ("01".equals(str)) {
            return PAY_ACCT;
        } else if ("02".equals(str)) {
            return RECV_ACCT;
        } else if ("03".equals(str)) {
        	return MER_PAYER;
        } else {
            throw new RuntimeException("手续费出款账户标志错误！ wrong FeeFrom string! " + str);
        }
    }
}
